<template>
  <div>
    <div><input type="text" :value="name"></div>
    <div><input type="date" v-bind:value="birthday"></div>
    <div><input type="button" value="点我加1" @click="m1"></div>
    <div><input type="button" value="点我减1" v-on:click="m2"></div>
    <div>{{ count }}</div>
    <div>
      <label for="">请输入年龄</label>
      <input type="text" v-model="age" @change="m3">
    </div>
    <div>{{fullName}}</div>
  </div>
</template>

<script>
const options = {
  data: function () {
    return {name: '张三', birthday: '1998-04-10', count: 0, age: 21}
  },
  methods: {
    m1: function () {
      this.count++
    },
    m2: function () {
      this.count--
    },
    m3: function () {
      console.log("值为：" + this.age)
    }
  },
  computed: {
    fullName() {
      return this.name + this.birthday
    }
  }
};
export default options
</script>

<style>

</style>